package buffs;

import runner.EnemyTemplate;

public class FreezeBuff implements Buff {
	private int duration;
	
	public FreezeBuff(String arg) {
		String[] args = arg.split(" ");
		duration = Integer.parseInt(args[0]);
	}
	
	@Override
	public void attacked(EnemyTemplate t) {
	}

	@Override
	public void ticked(EnemyTemplate t) {
		if (--duration <= 0) {
			return;
		}
		t.speed *= 0.5;
	}

}
